package com.meilai.project.mapper.other;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.meilai.project.entity.other.PCA;
import com.meilai.project.vo.SelectOptionVO;
import com.meilai.project.vo.other.PCAVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 张驰
 * @date 2021/3/15 14:25
 */
@Mapper
public interface PCAMapper extends BaseMapper<PCA> {
    List<SelectOptionVO> pcaList(@Param("pid") Long pid);
    List<PCAVO> pcAll();
    @Select("select a.id as `value`, a.fullname as label" +
            "        from pca a" +
            "        where a.pid = #{pid}" +
            "        order by a.id asc")
    List<PCAVO> pacByPid(@Param("pid") Long pid);
}
